#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1e9 + 5;
const int M = 1e9 + 7;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    int t;
    cin >> t;
    while (t--)
    {
        int n, m, i, j;
        cin >> n >> m >> i >> j;
        cout << 1 << ' ' << 1 << ' ' << n << ' ' << m << endl;
    }
    return 0;
}